x86/build: work around older GNU ld not leaving .got.plt empty
authorJan Beulich <jbeulich@suse.com>
Tue, 22 Mar 2022 12:10:59 +0000 (13:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 22 Mar 2022 12:10:59 +0000 (13:10 +0100)
commita2b8da2574586270207c6eb8e7aa8cd19eb74947
treef59184978389d828d9fe321578f3a0b4aef58431
parentb68664ab8954fd6aecbc579fc7444aa6e07f5581
x86/build: work around older GNU ld not leaving .got.plt empty

The initial three entries in .got.plt are "static", i.e. present
independent of actual entries allocation of which is triggered by
respective relocations. When no real entries are needed, halfway recent
ld discards the "static" portion of the table as well, but older GNU ld
fails to do so.

Fixes: dedb0aa42c6d ("x86/build: use --orphan-handling linker option if available")
Reported-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Julien Grall <jgrall@amazon.com>
xen/arch/x86/xen.lds.S